package gov.nasa.anml.lifted;

import gov.nasa.anml.PDDL;
import gov.nasa.anml.State;
import gov.nasa.anml.utility.*;

// T can (should?) be restricted to SimpleObject
// should do l-values and r-values
// so that assignment can be properly handled

public interface Expression<T, S extends SimpleObject<? super S>> extends Statement {
	public abstract T value(State s);
	public abstract History<S> storage(State p, State c);
	public abstract TypeCode typeCode();
	
	public abstract PDDL.Expression translateExpr(PDDL pddl, Interval unit);
	// the difference with translateStmt is that the statement version modifies unit.asPDDLAction() by directly
	// adding conditions and effects.  This one only builds the logic to appear as a sub-expression managed by 
	// its owner.  E.g., disjunctions over conjunctions.
	public abstract PDDL.Argument translateArgument(PDDL pddl, Interval unit);
	public abstract PDDL.Expression translateLValue(PDDL pddl, Interval unit);
}

